package com.zs.blog.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @Title: Category
 * @Author zs
 * @Package com.zs.blog.model.entity
 * @Date 2024/10/11 22:19
 * @description: 文章分类表
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("am_category")
public class Category {
    @Schema(description = "分类ID")
    @TableId(type = IdType.AUTO)
    public Long id;

    @Schema(description = "分类名称")
    public String categoryName;

    @Schema(description = "是否删除[0:不删除,1:删除]",defaultValue = "0")
    public Integer isDeleted;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    public LocalDateTime createTime;

    @Schema(description = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    public LocalDateTime updateTime;
}
